package com.gmail.blackdog1987.onedollar.entity;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by dongguochao on 12/7/15.
 */
@Entity
@Table(name = "t_order_logistics", schema = "", catalog = "onedollar")
public class TOrderLogisticsEntity {
    private int id;
    private String wlName;
    private String wlWebsite;
    private Timestamp addTime;
    private Timestamp updateTime;
    private Integer staus;
    private String memo;

    @Id
    @Column(name = "id", nullable = false, insertable = true, updatable = true)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "wl_name", nullable = true, insertable = true, updatable = true, length = 50)
    public String getWlName() {
        return wlName;
    }

    public void setWlName(String wlName) {
        this.wlName = wlName;
    }

    @Basic
    @Column(name = "wl_website", nullable = true, insertable = true, updatable = true, length = 100)
    public String getWlWebsite() {
        return wlWebsite;
    }

    public void setWlWebsite(String wlWebsite) {
        this.wlWebsite = wlWebsite;
    }

    @Basic
    @Column(name = "add_time", nullable = true, insertable = true, updatable = true)
    public Timestamp getAddTime() {
        return addTime;
    }

    public void setAddTime(Timestamp addTime) {
        this.addTime = addTime;
    }

    @Basic
    @Column(name = "update_time", nullable = true, insertable = true, updatable = true)
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "staus", nullable = true, insertable = true, updatable = true)
    public Integer getStaus() {
        return staus;
    }

    public void setStaus(Integer staus) {
        this.staus = staus;
    }

    @Basic
    @Column(name = "memo", nullable = true, insertable = true, updatable = true, length = 200)
    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TOrderLogisticsEntity that = (TOrderLogisticsEntity) o;

        if (id != that.id) return false;
        if (wlName != null ? !wlName.equals(that.wlName) : that.wlName != null) return false;
        if (wlWebsite != null ? !wlWebsite.equals(that.wlWebsite) : that.wlWebsite != null) return false;
        if (addTime != null ? !addTime.equals(that.addTime) : that.addTime != null) return false;
        if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false;
        if (staus != null ? !staus.equals(that.staus) : that.staus != null) return false;
        if (memo != null ? !memo.equals(that.memo) : that.memo != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (wlName != null ? wlName.hashCode() : 0);
        result = 31 * result + (wlWebsite != null ? wlWebsite.hashCode() : 0);
        result = 31 * result + (addTime != null ? addTime.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        result = 31 * result + (staus != null ? staus.hashCode() : 0);
        result = 31 * result + (memo != null ? memo.hashCode() : 0);
        return result;
    }
}
